<html>
<script>
if (window.testRunner) {
  testRunner.setPopupBlockingEnabled(false);
  testRunner.dumpAsText();
  testRunner.waitUntilDone();
}

function runTest() {
  var e = document.getElementById('console');
  e.innerHTML = w.opener == null ? 'PASS' : 'FAIL';

  w.close();

  if (window.testRunner)
    testRunner.notifyDone();
}

var w = window.open('http://127.0.0.1:8000/misc/resources/content-iframe.html');
w.opener = null;
w.onload = runTest;
</script>
<body>
This tests that following code works in Chrome:
<pre>
var w = window.open(...);
w.opener = null;
</pre>
After new page finishes loading, its opener should stay as null.

<p>
<div id="console">Running ...<div>
</body>
</html>
